<div class="blade-content ng-scope">
  <div class="blade-inner">
    <div class="inner-block">
      <form name="form" class="form" (submit)="onCreate()" [formGroup]="formGroup" novalidate>
        <div class="blade-static __bottom" *ngIf="currentBlade.isNew">
          <button class="btn" type="submit" [disabled]="!formGroup.valid">创建</button>
        </div>
        <div class="form-group">
          <label class="form-label">父级菜单</label>
          <div class="form-input">
            <select name="parentId" formControlName="parentId" (change)="compareById()">
                <option [value]="company.companyId" *ngFor="let company of companyItmes">                                
                     <span> {{company.companyName}}</span> 
                </option>            
            </select>
          </div>
        </div>
        <div class="form-group">
          <label class="form-label">组织结构名称</label>
          <div class="form-input">
            <input id="companyName" name="companyName" type="text" placeholder="输入组织结构名称" autocomplete="off" formControlName="companyName" >
          </div>
          <div *ngIf="showError" class="form-error">
            不能和父级名称相同！
          </div>
          <div *ngIf="formErrors.companyName" class="form-error">
            {{ formErrors.companyName }}
          </div>
        </div>
        <div class="form-group">
          <label class="form-label">组织结构编码</label>
          <div class="form-input">
            <input id="companyCode" name="companyCode" type="text" placeholder="输入菜单子名称" autocomplete="off" formControlName="companyCode">
          </div>
          <div *ngIf="formErrors.companyCode" class="form-error">
            {{ formErrors.companyCode }}
          </div>
        </div>
        <div class="form-group">
          <label class="form-label">集团英文名称</label>
          <div class="form-input">
            <input id="enName" name="enName" type="text" placeholder="输入集团英文名称" autocomplete="off" formControlName="enName">
          </div>
          <div *ngIf="formErrors.enName" class="form-error">
            {{ formErrors.enName }}
          </div>
        </div>

        <div class="form-group">
          <label class="form-label">输入联系人</label>
          <div class="form-input">
            <input id="contact" name="contact" type="text" placeholder="输入联系人" autocomplete="off" formControlName="contact">
          </div>
          <div *ngIf="formErrors.contact" class="form-error">
            {{ formErrors.contact }}
          </div>
        </div>
        <div class="form-group">
          <label class="form-label">联系电话</label>
          <div class="form-input">
            <input id="telNo" #menuIcon name="telNo" type="text" placeholder="输入联系电话" autocomplete="off" formControlName="telNo">       
          </div>
          <div *ngIf="formErrors.telNo" class="form-error">
            {{ formErrors.telNo }}
          </div>

        </div>

        <div class="form-group">
          <label class="form-label">输入邮箱</label>
          <div class="form-input">
            <input id="email" name="email" type="text" placeholder="输入邮箱" autocomplete="off" formControlName="email">
          </div>
          <div *ngIf="formErrors.email" class="form-error">
            {{ formErrors.email }}
          </div>
        </div>

        <div class="form-group">
          <label class="form-label">输入传真</label>
          <div class="form-input">
            <input id="faxNo" name="faxNo" type="text" placeholder="输入传真" autocomplete="off" formControlName="faxNo">
          </div>
          <div *ngIf="formErrors.faxNo" class="form-error">
            {{ formErrors.faxNo }}
          </div>
        </div>

        <div class="form-group">
          <label class="form-label">输入所在城市</label>
          <div class="form-input">
            <input id="city" name="city" type="text" placeholder="输入所在城市" autocomplete="off" formControlName="city">
          </div>
          <div *ngIf="formErrors.city" class="form-error">
            {{ formErrors.city }}
          </div>
        </div>


        <div class="form-group">
          <label class="form-label">输入地址</label>
          <div class="form-input">
            <input id="addr" name="addr" type="text" placeholder="输入地址" autocomplete="off" formControlName="addr">
          </div>
          <div *ngIf="formErrors.addr" class="form-error">
            {{ formErrors.addr }}
          </div>
        </div>
        <div class="form-group">
          <label class="form-label">输入邮编</label>
          <div class="form-input">
            <input id="zip" name="zip" type="text" placeholder="输入邮编" autocomplete="off" formControlName="zip">
          </div>
          <div *ngIf="formErrors.zip" class="form-error">
            {{ formErrors.zip }}
          </div>
        </div>
        <div class="form-group">
          <label class="form-label">输入集团简介</label>
          <div class="form-input">
            <input id="introduce" name="introduce" type="text" placeholder="输入集团简介" autocomplete="off" formControlName="introduce">
          </div>
          <div *ngIf="formErrors.introduce" class="form-error">
            {{ formErrors.introduce }}
          </div>
        </div>

      </form>
    </div>
  </div>
</div>